API Documentation
StringView.h
1 // StringView.h
3 //
5 
6 namespace nkMemory
7 {
21  class StringView final
22  {
23  public :
24 
36  StringView (const char* data) ;
45  StringView (const char* data, unsigned long long size) ;
52  StringView (const String& other) ;
57 
58  // Getters
62  const char* getData () const ;
66  unsigned long long getSize () const ;
70  bool empty () const ;
74  char front () const ;
78  char back () const ;
79 
80  // Operators
86  StringView& operator= (const char* data) ;
92  StringView& operator= (const String& other) ;
98  char operator[] (unsigned long long index) const ;
104  bool operator== (const char* other) ;
110  bool operator== (const String& other) ;
116  bool operator== (const StringView& other) ;
117 
118  public :
119 
126  StringView (const std::string& str) ;
135  StringView (const std::string& str, unsigned long long index, unsigned long long size = 0ull) ;
142  StringView (const std::string_view& str) ;
151  StringView (const std::string_view& str, unsigned long long index, unsigned long long size = 0ull) ;
152 
153  public :
154 
158  operator std::string () const ;
162  operator std::string_view () const ;
163  } ;
164 }
nkMemory::StringView::empty
bool empty() const
nkMemory::StringView::~StringView
~StringView()
nkMemory::StringView::StringView
StringView(const std::string &str, unsigned long long index, unsigned long long size=0ull)
nkMemory::StringView::StringView
StringView(const std::string_view &str)
nkMemory::StringView::StringView
StringView(const std::string &str)
nkMemory::StringView::operator[]
char operator[](unsigned long long index) const
nkMemory::StringView::StringView
StringView(const char *data)
nkMemory::StringView::StringView
StringView(const char *data, unsigned long long size)
nkMemory::StringView::StringView
StringView()
nkMemory::StringView::front
char front() const
nkMemory::StringView::operator==
bool operator==(const char *other)
nkMemory::StringView::getSize
unsigned long long getSize() const
nkMemory::StringView::getData
const char * getData() const
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkMemory::StringView::StringView
StringView(const std::string_view &str, unsigned long long index, unsigned long long size=0ull)
nkMemory::StringView::operator=
StringView & operator=(const char *data)
nkMemory::StringView::back
char back() const
nkMemory::StringView::StringView
StringView(const String &other)
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7